package com.spring;

// BeanPostProcessor是Spring IOC容器给我们提供的一个扩展接口

/**
 * 运行顺序
 * ===Spring IOC容器实例化Bean===
 * ===调用BeanPostProcessor的postProcessBeforeInitialization方法===
 * ===调用bean实例的初始化方法===
 * ===调用BeanPostProcessor的postProcessAfterInitialization方法
 */
public interface BeanPostProcessor {

    //bean初始化方法调用前被调用
    Object postProcessBeforeInitialization(Object bean, String beanName);

    //bean初始化方法调用后被调用
    Object postProcessAfterInitialization(Object bean, String beanName);
}
